<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS3——媒体查询</title>
    <style>
        .content{
            width:100px;
            height:100px;
            background:red;
        }

        /* 当屏幕宽度不超过300像素时，div显示为橙色 */
        @media screen and (max-width:400px) {
            .content{
                background:orange;
            }
        }
    </style>
</head>
<body>
    <div class="content"></div>
</body>
</html>